package ex1;

/**
 * @author: knowno
 * @create: 2024-09-06 08:59
 * @Version 1.0
 **/
public class Rect extends MyShape {
    double width;
    double height;

    public Rect() {
    }

    public Rect(double width, double height) {
        this.width = width;
        this.height = height;
    }

    @Override
    public double getArea() {
        return width * height;
    }

    @Override
    public double getLen() {
        return 2 * (width + height);
    }
}
